package array;

public class ArrayTest {
    public static void main(String[] args) {
        CustomArray<Integer> customArray = new CustomArray<>();
        for (int i = 0; i < 10; i++) {
            customArray.addLast(i);
        }

        System.out.println("customArray = " + customArray);
        customArray.add(1, 100);
        System.out.println("customArray = " + customArray);
        customArray.addFirst(-1);
        System.out.println("customArray = " + customArray);
        customArray.remove(1);
        System.out.println("customArray = " + customArray);
        System.out.println("customArray.get(0) = " + customArray.get(0));
        customArray.set(0, 0);
        System.out.println("customArray = " + customArray);
        System.out.println("customArray = " + customArray);
        System.out.println("customArray.find(5) = " + customArray.find(5));
        System.out.println("customArray.contains(4) = " + customArray.contains(4));
        customArray.removeLast();
        customArray.removeLast();
        customArray.removeLast();
        customArray.removeLast();
        customArray.removeLast();
        System.out.println("customArray = " + customArray);
        customArray.removeLast();
        System.out.println("customArray = " + customArray);
        String s = "王开琦";
        String intern = s.intern();
//        System.out.println("intern==s = " + intern==s);
        System.out.println("王开琦" == s);
        System.out.println("王开琦" == intern);
        String s1 = new String(s);
        System.out.println("s1== = " + s1==s);

    }
}
